package com.ecoolex.discount.sales.ws;

import java.util.List;

import com.ecoolex.discount.sales.entity.*;
import com.ecoolex.discount.sales.enums.DiscountProductServiceType;
import com.ecoolex.discount.sales.pojo.*;
import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;

public interface DiscountProductService {

	DiscountClassify addDiscountClassify(DiscountClassify record,String createUser) throws BizException;
	
	DiscountClassify editDiscountClassify(DiscountClassify record,String updateUser) throws BizException;
	
	void deleteDiscountClassify(DiscountClassify record,String updateUser) throws BizException;
	
	void onlineDiscountClassify(DiscountClassify record,String updateUser) throws BizException;
	
	void offlineDiscountClassify(DiscountClassify record,String updateUser) throws BizException;
	
	DiscountClassify getDiscountClassify(Integer classifyId);
	
	Pagination<DiscountClassify> queryDiscountClassify(QueryDiscountClassifyDTO query,Sorting[] sorts,Page page);
	
	DiscountClassify getDiscountClassifyByBrandIdForH5(Integer brandId,Integer regionType);
	
	DiscountBrandWithBLOBs addDiscountBrand(DiscountBrandWithBLOBs record,List<AddDiscountBrandClassifyDTO> list,String createUser) throws BizException;
	
	DiscountBrandWithBLOBs editDiscountBrand(DiscountBrandWithBLOBs record,List<AddDiscountBrandClassifyDTO> list,String updateUser) throws BizException;
	
	void deleteDiscountBrand(DiscountBrandWithBLOBs record,String updateUser) throws BizException;
	
	void onlineDiscountBrand(DiscountBrandWithBLOBs record,String updateUser) throws BizException;
	
	void offlineDiscountBrand(DiscountBrandWithBLOBs record,String updateUser) throws BizException;
	
	DiscountBrandWithBLOBs getDiscountBrand(Integer brandId);

    Long countProductService(DiscountProductServiceType serviceType, String serviceDataId);

	DiscountBrandWithBLOBs getDiscountBrandForH5(Integer brandId);
	
	Pagination<DiscountBrandWithBLOBs> queryDiscountBrand(QueryDiscountBrandDTO query,Sorting[] sorts,Page page);

	List<DiscountBrandWithBLOBs> listDiscountBrandForH5(QueryMarketingClassifyBrandDTO query,Integer size);
	
	List<DiscountBrandClassify> getByBrandId(Integer brandId);

	DiscountProductWithBLOBs getProductById(Integer productId);

	Pagination<DiscountProductWithBLOBs> queryProduct(QueryDiscountProductDTO query, Sorting[] sorts, Page page);

	DiscountProductWithBLOBs getOnlineProductById(Integer productId);

	Pagination<DiscountProductWithBLOBs> queryProductByOnline(QueryOnlineDiscountProductDTO query, Page page);

	List<DiscountProductWithBLOBs> queryProductByOnline(QueryOnlineDiscountProductDTO query, Integer size);

	DiscountProductWithBLOBs createProduct(AddDiscountProductDTO add, String createUser) throws BizException;

	void updateProduct(Integer productId, EditDiscountProductDTO edit, String updateUser) throws BizException;

	void updateProductAttach(Integer productId,List<EditDiscountProductAttachDTO> attachList, String updateUser) throws BizException;
	
	void updateProductMarketing(Integer productId, EditDiscountProductOperationStrategyDTO edit, String updateUser) throws BizException;

	void onlineProduct(Integer productId, String updateUser) throws BizException;

	void offlineProduct(Integer productId, String updateUser) throws BizException;

	void deleteProduct(Integer productId, String updateUser) throws BizException;

	void updateProductGiftCard(Integer productId, EditDiscountProductGiftCardDTO edit, String updateUser) throws BizException;

	DiscountProductGiftCard getGiftCardByProductId(Integer productId);

	void updateProductVouchers(Integer productId, EditDiscountProductVouchersDTO edit, String updateUser) throws BizException;

	DiscountProductVouchers getVouchersByProductId(Integer productId);

    void updateProductRecharge(Integer productId, EditDiscountProductRechargeDTO edit, String updateUser) throws BizException;

	DiscountProductRecharge getRechargeByProductId(Integer productId);
	
	YouWorldGiftCard getYouWorldGiftCard(Integer cardId);

	Pagination<YouWorldGiftCard> queryYouWorldGiftCard(String cardName,Sorting[] sorts, Page page);

	Pagination<YouWorldGiftCardOrder> queryYouWorldGiftCardOrder(QueryYouWorldGiftCardOrderDTO query, Sorting[] sorts, Page page);

	YouWorldServiceProviderInfoDTO getYouWorldServiceProviderInfo();

    Pagination<QuanMaoCard> queryQuanMaoCard(Sorting[] sorts, Page page);

	Pagination<QuanMaoCardOrder> queryQuanMaoCardOrder(QueryQuanMaoCardOrderDTO query, Sorting[] sorts, Page page);

	QuanMaoServiceProviderInfoDTO getQuanMaoServiceProviderInfo();

	DiscountProductInventory addInventory(Integer productId, AddDiscountProductInventoryDTO add, String createUser) throws BizException;

	void batchAddInventory(Integer productId, List<AddDiscountProductInventoryDTO> addList, String createUser) throws BizException;

	void updateInventory(Integer inventoryId, EditDiscountProductInventoryDTO edit, String updateUser) throws BizException;

	DiscountProductInventory getInventoryById(Integer inventoryId);

	Pagination<DiscountProductInventory> queryInventory(QueryDiscountProductInventoryDTO query, Sorting[] sorts, Page page);

	void invalidInventory(Integer inventoryId, String updateUser) throws BizException;

	void deleteInventory(Integer inventoryId, String updateUser);
	
	List<DiscountProductAttach> listByMainProductId(Integer productId);
	
	Long productInventory(Integer productId);
}
